package test;

import java.util.concurrent.locks.ReentrantLock;

public class Singnal {
    private static Singnal singnal;
    private Singnal() {
    }
    private static ReentrantLock reentrantLock = new ReentrantLock();

    public static Singnal getInstance() {
        if (singnal == null) {
            reentrantLock.lock();
            if (singnal == null) {
                singnal = new Singnal();
            }
            reentrantLock.unlock();
        }
        return singnal;
    }
}
